.TH "UNICORN" "3" "Jan 19th 2025" "Unicorn 1.0.3"
.SH NAME
uni_prevbrk \- compute preceding boundary
.SH LIBRARY
Embeddable Unicode Algorithms (libunicorn, -lunicorn)
.SH SYNOPSIS
.nf
.B #include <unicorn.h>
.PP
.BI "unistat uni_prevbrk(unibreak " boundary ", const void *" text ", unisize " text_len ", uniattr " text_attr ", unisize *" index ");"
.fi
.SH DESCRIPTION
Compute the preceding \f[I]boundary\f[R] for \f[I]text\f[R] starting from a known code point specified by code unit index \f[I]index\f[R].
The implementation sets \f[I]index\f[R] to the code unit offset of the preceding \f[I]boundary\f[R].
.SH RETURN VALUE
.TP
UNI_OK
If the break iterator was successfully repositioned.
.TP
UNI_DONE
If \f[I]index\f[R] is at the beginning of \f[I]text\f[R].
.TP
UNI_BAD_OPERATION
If \f[I]text\f[R] or \f[I]index\f[R] is \f[C]NULL\f[R].
.TP
UNI_BAD_ENCODING
If \f[I]text\f[R] is malformed; this is never returned if \f[I]text_attr\f[R] has \f[B]UNI_TRUST\f[R](3).
.SH SEE ALSO
.BR UNI_TRUST (3),
.BR unibreak (3),
.BR unisize (3),
.BR uniattr (3)
.SH AUTHOR
.UR https://railgunlabs.com
Railgun Labs
.UE .
.SH INTERNET RESOURCES
The online documentation is published on the
.UR https://railgunlabs.com/unicorn
Railgun Labs website
.UE .
.SH LICENSING
Unicorn is distributed with its end-user license agreement (EULA).
Please review the agreement for information on terms & conditions for accessing or otherwise using Unicorn and for a DISCLAIMER OF ALL WARRANTIES.
